﻿using Helpers.Common;

namespace Billing.Service.Billing
{
    public class BillingItem
    {
        #region Properties

        public Product Product { get; set; }
        public int ProductCount { get; set; }
        public float TotalPrice 
        {
            get { return this.Product.PricePerUnit * this.ProductCount; }
            private set { } //Empty set for serialization.
        }

        #endregion

        #region Constructors

        public BillingItem() { }

        #endregion

        #region Methods

        public override string ToString()
        {
            return "{" + HelperCommon.ObjectToString(this) + "}";
        }

        #endregion
    }
}
